/**
 * 
 */
package com.lanswon.controller;

import java.io.IOException;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.lanswon.service.AdminService;
import com.lanswon.service.SearchService;

/**   
* 
* @ClassName: SearchController.java
* @Description: 搜索功能
*
* @version: v1.0.0
* @author: zm
* @date: 2018年5月9日 上午9:38:17 
*
*/
@Controller  
@RequestMapping("/front/search") 
public class SearchController {
	@Autowired
	SearchService searchService;
	
	@RequestMapping("/count")
	@ResponseBody
	public Map<String, Object> count(String searchContent)  {
		return searchService.count(searchContent);
	}
	@RequestMapping("/show")
	@ResponseBody
	public Map<String, Object> show()  {
		return searchService.getHotStatus();
	}
	
	@RequestMapping("/doSearch")
	@ResponseBody
	public Map<String, Object> search(String content)  {
		return searchService.search(content);
	}
}
